1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 25 module sourceview.StyleSchemeChooserButton; 26 27 private import glib.ConstructionException; 28 private import gobject.ObjectG; 29 private import gtk.AccessibleIF; 30 private import gtk.AccessibleT; 31 private import gtk.ActionableIF; 32 private import gtk.ActionableT; 33 private import gtk.BuildableIF; 34 private import gtk.BuildableT; 35 private import gtk.Button; 36 private import gtk.ConstraintTargetIF; 37 private import gtk.ConstraintTargetT; 38 private import gtk.Widget; 39 private import sourceview.StyleSchemeChooserIF; 40 private import sourceview.StyleSchemeChooserT; 41 private import sourceview.c.functions; 42 public import sourceview.c.types; 43 44 45 /** 46 * A button to launch a style scheme selection dialog. 47 * 48 * The `GtkSourceStyleSchemeChooserButton` is a button which displays 49 * the currently selected style scheme and allows to open a style scheme 50 * selection dialog to change the style scheme. 51 * It is suitable widget for selecting a style scheme in a preference dialog. 52 * 53 * In `GtkSourceStyleSchemeChooserButton`, a [class@StyleSchemeChooserWidget] 54 * is used to provide a dialog for selecting style schemes. 55 */ 56 public class StyleSchemeChooserButton : Button, StyleSchemeChooserIF 57 { 58 /** the main Gtk struct */ 59 protected GtkSourceStyleSchemeChooserButton* gtkSourceStyleSchemeChooserButton; 60 61 /** Get the main Gtk struct */ 62 public GtkSourceStyleSchemeChooserButton* getStyleSchemeChooserButtonStruct(bool transferOwnership = false) 63 { 64 if (transferOwnership) 65 ownedRef = false; 66 return gtkSourceStyleSchemeChooserButton; 67 } 68 69 /** the main Gtk struct as a void* */ 70 protected override void* getStruct() 71 { 72 return cast(void*)gtkSourceStyleSchemeChooserButton; 73 } 74 75 /** 76 * Sets our main struct and passes it to the parent class. 77 */ 78 public this (GtkSourceStyleSchemeChooserButton* gtkSourceStyleSchemeChooserButton, bool ownedRef = false) 79 { 80 this.gtkSourceStyleSchemeChooserButton = gtkSourceStyleSchemeChooserButton; 81 super(cast(GtkButton*)gtkSourceStyleSchemeChooserButton, ownedRef); 82 } 83 84 // add the StyleSchemeChooser capabilities 85 mixin StyleSchemeChooserT!(GtkSourceStyleSchemeChooserButton); 86 87 88 /** */ 89 public static GType getType() 90 { 91 return gtk_source_style_scheme_chooser_button_get_type(); 92 } 93 94 /** 95 * Creates a new #GtkSourceStyleSchemeChooserButton. 96 * 97 * Returns: a new #GtkSourceStyleSchemeChooserButton. 98 * 99 * Throws: ConstructionException GTK+ fails to create the object. 100 */ 101 public this() 102 { 103 auto __p = gtk_source_style_scheme_chooser_button_new(); 104 105 if(__p is null) 106 { 107 throw new ConstructionException("null returned by new"); 108 } 109 110 this(cast(GtkSourceStyleSchemeChooserButton*) __p); 111 } 112 }